/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface MatMoreApply extends BasicModel<MatMoreApply> {
  code?: string; // 申请单号
  ddate?: string; // 单据日期
  orderId?: string; // 订单ID
  picId?: string; // 图纸ID
  iqty?: number; // 数量
  sumPuQty?: number; // 累计采购数
  createByName?: string; // create_by_name
  updateByName?: string; // update_by_name
  bclose?: string; // 停止补料
}

export const matMoreApplyList = (params?: MatMoreApply | any) =>
  defHttp.get<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/list', params });

export const matMoreApplyListData = (params?: MatMoreApply | any) =>
  defHttp.post<Page<MatMoreApply>>({ url: adminPath + '/rd/apply/matMoreApply/listData', params });

export const matMoreApplyFlListData = (params?: MatMoreApply | any) =>
  defHttp.post<Page<MatMoreApply>>({ url: adminPath + '/rd/apply/matMoreApply/flListData', params });

export const matMoreApplyForm = (params?: MatMoreApply | any) =>
  defHttp.get<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/form', params });

export const matMoreApplySave = (params?: any, data?: MatMoreApply | any) =>
  defHttp.postJson<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/save', params, data });

export const matMoreApplyDisable = (params?: MatMoreApply | any) =>
  defHttp.get<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/disable', params });

export const matMoreApplyEnable = (params?: MatMoreApply | any) =>
  defHttp.get<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/enable', params });

export const matMoreApplyDelete = (params?: MatMoreApply | any) =>
  defHttp.get<MatMoreApply>({ url: adminPath + '/rd/apply/matMoreApply/delete', params });
